<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>Txt2tags User Guide</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
<LINK REL="Start" HREF="index.html">
<LINK REL="Contents" HREF="index.html">
<LINK REL="Prev" HREF="PartVIIIBlackMagic.html">
<LINK REL="Next" HREF="CreatingTargetSpecificContentswithpreproc.html">
<STYLE TYPE="text/css"><!--
BODY { font-family: serif }
H1 { font-family: sans-serif }
H2 { font-family: sans-serif }
H3 { font-family: sans-serif }
H4 { font-family: sans-serif }
H5 { font-family: sans-serif }
H6 { font-family: sans-serif }
SUB { font-size: smaller }
SUP { font-size: smaller }
PRE { font-family: monospace }
--></STYLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="userguide.css"></HEAD>
<BODY>
<A HREF="index.html">Contents</A>
<A HREF="PartVIIIBlackMagic.html">Previous</A>
<A HREF="CreatingTargetSpecificContentswithpreproc.html">Next</A>
<HR NOSHADE>

<H2><A NAME="9_1">Inserting Multiple Lines with %!postproc (such as CSS
 rules)</A></H2>
<P> In filters, the replacement pattern can include multiple lines using
 the <CODE>\n</CODE> line break char.</P>
<P> This can be handy for including really short CSS rules on HTML
 target, with no need to create a separate file:</P>
<PRE>
%!postproc: &lt;HEAD&gt;      '&lt;HEAD&gt;\n&lt;STYLE TYPE=&quot;text/css&quot;&gt;\n&lt;/STYLE&gt;'
%!postproc: (&lt;/STYLE&gt;)  'body     { margin:3em               ;} \n\1'
%!postproc: (&lt;/STYLE&gt;)  'a        { text-decoration:none     ;} \n\1'
%!postproc: (&lt;/STYLE&gt;)  'pre,code { background-color:#ffffcc ;} \n\1'
%!postproc: (&lt;/STYLE&gt;)  'th       { background-color:yellow  ;} \n\1'
</PRE>
<P> All the filters are tied to the first one, by replacing a string
 that it has inserted. So a single &quot;&lt;HEAD&gt;&quot; turns to:</P>
<PRE>
&lt;HEAD&gt;
&lt;STYLE TYPE=&quot;text/css&quot;&gt;
body     { margin:3em               ;}
a        { text-decoration:none     ;}
pre,code { background-color:#ffffcc ;}
th       { background-color:yellow  ;}
&lt;/STYLE&gt;
</PRE>
 <A NAME="target-specific-contents"></A><HR NOSHADE>
<A HREF="index.html">Contents</A>
<A HREF="PartVIIIBlackMagic.html">Previous</A>
<A HREF="CreatingTargetSpecificContentswithpreproc.html">Next</A>
</BODY>
</HTML>
